package com.oriole.api.module.sys.repository;


import com.oriole.entity.sys.SysUser;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;


/**
 * <p>
 * 系统用户表 Mapper 接口
 * </p>
 *
 * @author hautxxxyzjk@163.com
 * @since 2020-03-10
 */
public interface SysUserRepository extends JpaRepository<SysUser, Long>, JpaSpecificationExecutor<SysUser> {

    @EntityGraph(attributePaths = {"sysRoles", "sysDept", "sysRoles.sysMenus"})
    SysUser findByUsername(String username);
}
